package com.newtouch.bxzs.database.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.newtouch.bxzs.common.base.model.Button;
import com.newtouch.bxzs.database.model.bo.MenuButtonBO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 按钮Mapper:
 *
 * <p>
 * <b>History:</b>
 * <table border="1">
 * <tr>
 * <th>Date</th>
 * <th>Operator</th>
 * <th>Memo</th>
 * </tr>
 * <tr>
 * <td>2021/1/4 17:41</td>
 * <td>tianshangzhu</td>
 * <td>Create</td>
 * </tr>
 * </table>
 *
 * @author tianshangzhu
 * @version 1.0.0
 * @since 1.0.0
 */
@Mapper
public interface ButtonMapper extends BaseMapper<Button> {
    /**
     * 查询角色对应的菜单列表
     *
     * @param roleId 角色id
     * @return List<MenuButtonBO>
     */
    List<MenuButtonBO> listButtonsByRoleId(@Param("roleId") String roleId);

    /**
     * 获取选中菜单的按钮列表
     * * @param menuIdList menuIdList
     *
     * @return List<MenuButtonBO>
     */
    List<MenuButtonBO> listButtonsByMenuId(@Param("menuIdList") List<String> menuIdList);
}
